<div class="form">

<?php $form=$this->beginWidget('CActiveForm', array(
	'id'=>'users-form',
	'enableAjaxValidation'=>true,
)); ?>

	<p class="note">
		Fields with <span class="required">*</span> are required.
	</p>

	<?php echo $form->errorSummary($model); ?>

	<div class="row">
	<?php echo $form->labelEx($model,'username'); ?>
	<?php echo $form->textField($model,'username',array('size'=>32,'maxlength'=>32)); ?>
	<?php echo $form->error($model,'username'); ?>
	</div>

	<div class="row">
	<?php echo $form->labelEx($model,'password'); ?>
	<?php echo $form->textField($model,'password',array('size'=>32)); ?>
	<?php if (!$model->isNewRecord): ?>
		<p class="note">
			Above is the member's encrypted password. To change the password,
			simply type a new one.<br />GLOrganizer will do the encryption
			automatically.
		</p>
		<?php endif; ?>
		<?php echo $form->error($model,'password'); ?>
	</div>

	<div class="row">
	<?php echo $form->labelEx($model,'first_name'); ?>
	<?php echo $form->textField($model,'first_name',array('size'=>32,'maxlength'=>32)); ?>
	<?php echo $form->error($model,'first_name'); ?>
	</div>

	<div class="row">
	<?php echo $form->labelEx($model,'last_name'); ?>
	<?php echo $form->textField($model,'last_name',array('size'=>32,'maxlength'=>32)); ?>
	<?php echo $form->error($model,'last_name'); ?>
	</div>

	<div class="row">
	<?php echo $form->labelEx($model,'role'); ?>
	<?php echo $form->dropDownList($model,'role',$model->getRoleOptions()); ?>
	<?php echo $form->error($model,'role'); ?>
	</div>

	<div class="row buttons">
	<?php echo CHtml::submitButton($model->isNewRecord ? 'Create' : 'Save'); ?>
	</div>

	<?php $this->endWidget(); ?>

</div>
<!-- form -->
